source activate ke2torch23cu121

model=llama2-7b-chat
method=ICE
date=2025-03-28

gpu_id=0

# KnowEdit datasets
declare -A datasets=(
    # ["zsre"]="./dataset/KnowEdit/benchmark/ZsRE/ZsRE-test-all.json"
    # ["recent"]="./dataset/KnowEdit/benchmark/wiki_recent/recent_test.json"
    ["counterfact"]="./dataset/KnowEdit/benchmark/wiki_counterfact/test_cf.json"
    ["wikibio"]="./dataset/KnowEdit/benchmark/WikiBio/wikibio-test-all.json"
)

for method_type in kl js; do
    for datatype in "${!datasets[@]}"; do
        data_dir="${datasets[$datatype]}"
        echo "${date}/${method}-${method_type}/${model}-${datatype}-${gpu_id}"
        CUDA_VISIBLE_DEVICES=${gpu_id} python examples/run_knowedit_llama2.py \
            --editing_method=${method} \
            --hparams_dir=./hparams/${method}/${model}-${method_type}.yaml \
            --data_dir=${data_dir} \
            --datatype=${datatype} \
            --metrics_save_dir=./results/${model}/${method}-${method_type}-${date} \
            --pre_file=./pre_edit/${model}_${datatype}_pre_edit.json \
            > log/${date}/${method}-${method_type}/${model}-${datatype}-${gpu_id}.log 2>&1 &
        wait
    done
done